<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="author" content="Lancer" />
	<script type="text/javascript" src="../../jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="../../js/jquery.czCombobox.js"></script>
    <link rel="stylesheet" type="text/css" href="../../themes/czCombobox.css"  />
    <title>czCombobox Demo</title>

	<script type="text/javascript">
    $(document).ready(function() {
		$('#country1').czCombobox({
            className : 'light-black',
			changeCallback: function() {
				//alert('Has Changed')
			}
		});


		$('#country2').czCombobox({
            className : 'light-black',
            changeCallback:function() {
                log('Demo2 change');
            }
		});


		$('#language').czCombobox({
            className : 'small',
            dropUp    : false,
            hideSelected: true  ,
            focusCallback:function() {
                log('Demo3 focus');
            },
            blurCallback:function() {
                log('Demo3 blur');
            },
            changeCallback:function() {
                log('Demo3 change');
            }
        });

		var czCountry1 = $('#country1').czCombobox('instance');
		$('#getValue1').click(function(){alert(czCountry1.getValue())});
		$('#getText1').click(function(){alert( czCountry1.getText())});
		$('#setFocus1').click(function(){czCountry1.setFocus()});
		$('#select1').click(function(){czCountry1.setOption(87)});

		var czCountry2 = $('#country2').czCombobox('instance');
		$('#getValue2').click(function(){alert(czCountry2.getValue())});
		$('#getText2').click(function(){alert( czCountry2.getText())});
		$('#setFocus2').click(function(){czCountry2.setFocus();});
		$('#select2').click(function(){czCountry2.setOption('US')});

    });

	function log($message) {
		var debug = true;
		if ( debug ) {
			if (window.console && window.console.log)
				window.console.log($message);
			else
				alert($message);
		} else {
			alert($message);
		}
	}
  	</script>
</head>

<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" colspan="3">Demo 1: Please select your coutry(has group)</td>
  </tr>
  <tr>
    <td width="70" align="right"></td>
    <td width="100" height="30" align="right"><label for="country1">Your Country: </label> </td>
	<td>
      <select id="country1" name="country1">
      	<option value="">Select</option>
        <optgroup label="---America---">
          <option value="251">Anguilla</option>
          <option value="75">Antigua Barbuda</option>
          <option value="74">Argentina</option>
          <option value="253">Aruba</option>
          <option value="96">Bahamas</option>
          <option value="76">Barbados</option>
          <option value="254">Belize</option>
          <option value="230">Bermuda</option>
          <option value="77">Bolivia</option>
          <option value="78">Brazil</option>
          <option value="85">Canada</option>
          <option value="233">Cayman Islands</option>
          <option value="95">Chile</option>
          <option value="82">Colombia</option>
          <option value="228">Costa Rica</option>
          <option value="81">Cuba</option>
          <option value="79">Dominica</option>
          <option value="260">Dominican Republic</option>
          <option value="80">Ecuador</option>
          <option value="261">El Salvador</option>
          <option value="263">French Guiana</option>
          <option value="267">Greenland</option>
          <option value="83">Grenada</option>
          <option value="268">Guadeloupe</option>
          <option value="270">Guatemala</option>
          <option value="84">Guyana</option>
          <option value="271">Haiti</option>
          <option value="273">Honduras</option>
          <option value="94">Jamaica</option>
          <option value="277">Martinique</option>
          <option value="88">Mexico</option>
          <option value="247">Netherlands Antilles</option>
          <option value="278">Nicaragua</option>
          <option value="248">Panama</option>
          <option value="281">Paraguay</option>
          <option value="86">Peru</option>
          <option value="283">Puerto Rico</option>
          <option value="286">Saint Kitts and Nevis</option>
          <option value="287">Saint Pierre and Miquelon</option>
          <option value="288">Saint Vincent and the Grenadines</option>
          <option value="90">Saint-lucia</option>
          <option value="89">Surinam</option>
          <option value="91">Trinidad and Tobago</option>
          <option value="295">Turks and Caicos Islands</option>
          <option value="87">United States</option>
          <option value="297">United States Minor Outlying Islands</option>
          <option value="92">Uruguay</option>
          <option value="93">Venezuela</option>
          <option value="298">Virgin Islands, British</option>
          <option value="299">Virgin Islands, U.S.</option>
        </optgroup>
        <optgroup label="---Europe---">
          <option value="3">Albania</option>
          <option value="1">Andorra</option>
          <option value="2">Austria</option>
          <option value="7">Belarus</option>
          <option value="11">Belgium</option>
          <option value="10">Bosnia</option>
          <option value="8">Bulgaria</option>
          <option value="19">Croatia</option>
          <option value="229">Cyprus</option>
          <option value="18">Czech Republic</option>
          <option value="13">Denmark</option>
          <option value="5">Estonia</option>
          <option value="231">Falkland Islands</option>
          <option value="262">Faroe Islands</option>
          <option value="16">Finland</option>
          <option value="15">France</option>
          <option value="12">Germany</option>
          <option value="266">Gibraltar</option>
          <option value="171">Greece</option>
          <option value="304">Guernsey</option>
          <option value="172">Hungary</option>
          <option value="6">Iceland</option>
          <option value="4">Ireland</option>
          <option value="302">Isle of Man</option>
          <option value="173">Italy</option>
          <option value="303">Jersey</option>
          <option value="20">Latvia</option>
          <option value="22">Liechtenstein</option>
          <option value="21">Lithuania</option>
          <option value="158">Luxembourg</option>
          <option value="24">Macedonia</option>
          <option value="25">Malta</option>
          <option value="160">Moldova</option>
          <option value="159">Monaco</option>
          <option value="305">Montenegro</option>
          <option value="161">Norway</option>
          <option value="9">Poland</option>
          <option value="163">Portugal</option>
          <option value="23">Romania</option>
          <option value="14">Russia Federation</option>
          <option value="168">San Marino</option>
          <option value="162">Serbia</option>
          <option value="166">Slovakia</option>
          <option value="167">Slovenia</option>
          <option value="170">Spain</option>
          <option value="292">Svalbard and Jan Mayen</option>
          <option value="164">Sweden</option>
          <option value="165">Switzerland</option>
          <option value="17">The Netherlands</option>
          <option value="289">The Republic of Serbia</option>
          <option value="169">Ukraine</option>
          <option value="232">United Arab Emirates</option>
          <option value="174">United Kingdom</option>
        </optgroup>
        <optgroup label="---Asia---">
          <option value="26">Afghanistan</option>
          <option value="64">Armenia</option>
          <option value="29">Azerbaijan</option>
          <option value="32">Bahrain</option>
          <option value="49">Bangladesh</option>
          <option value="33">Bhutan</option>
          <option value="60">Brunei</option>
          <option value="41">Cambodia</option>
          <option value="73">China</option>
          <option value="35">East Timor</option>
          <option value="37">Georgia</option>
          <option value="176">Hong Kong</option>
          <option value="69">India</option>
          <option value="70">Indonesia</option>
          <option value="66">Iran</option>
          <option value="67">Iraq</option>
          <option value="68">Israel</option>
          <option value="52">Japan</option>
          <option value="71">Jordan</option>
          <option value="38">Kazakhstan</option>
          <option value="40">Kirgizstan</option>
          <option value="43">Kuwait</option>
          <option value="44">Laos</option>
          <option value="45">Lebanon</option>
          <option value="47">Malaysia</option>
          <option value="46">Maldives</option>
          <option value="48">Mongolia</option>
          <option value="50">Myanmar</option>
          <option value="51">Nepal</option>
          <option value="34">North Korea</option>
          <option value="28">Oman</option>
          <option value="30">Pakistan</option>
          <option value="31">Palestine</option>
          <option value="36">Philippines</option>
          <option value="42">Qatar</option>
          <option value="54">Saudi Arabia</option>
          <option value="62">Singapore</option>
          <option value="39">South Korea</option>
          <option value="55">Sri Lanka</option>
          <option value="63">Syria</option>
          <option value="175">Taiwan</option>
          <option value="56">Tajikistan</option>
          <option value="57">Thailand</option>
          <option value="58">Turkey</option>
          <option value="59">Turkmenistan</option>
          <option value="61">Uzbekistan</option>
          <option value="72">Viet Nam</option>
          <option value="65">Yemen</option>
        </optgroup>
        <optgroup label="---Africa---">
          <option value="97">Algeria</option>
          <option value="100">Angola</option>
          <option value="101">Benin</option>
          <option value="102">Botswana</option>
          <option value="103">Burkina-faso</option>
          <option value="104">Burundi</option>
          <option value="118">Cameroon</option>
          <option value="257">Cape Verde</option>
          <option value="147">Central Africa</option>
          <option value="146">Chad</option>
          <option value="119">Comoros</option>
          <option value="110">Congo</option>
          <option value="120">Cote d'Ivoire</option>
          <option value="111">Democratic Republic of the Congo</option>
          <option value="112">Djibouti</option>
          <option value="98">Egypt</option>
          <option value="105">Equatorial Guinea</option>
          <option value="107">Eritrea</option>
          <option value="99">Ethiopia</option>
          <option value="115">Gabon</option>
          <option value="109">Gambia</option>
          <option value="116">Ghana</option>
          <option value="113">Guinea</option>
          <option value="114">Guinea Bissau</option>
          <option value="121">Kenya</option>
          <option value="122">Lesotho</option>
          <option value="123">Liberia</option>
          <option value="124">Libya</option>
          <option value="126">Madagascar</option>
          <option value="275">Malawi</option>
          <option value="127">Mali</option>
          <option value="129">Mauritania</option>
          <option value="128">Mauritius</option>
          <option value="130">Morocco</option>
          <option value="131">Mozambique</option>
          <option value="132">Namibia</option>
          <option value="134">Niger</option>
          <option value="135">Nigeria</option>
          <option value="284">Reunion</option>
          <option value="125">Rwanda</option>
          <option value="285">Saint Helena</option>
          <option value="139">Sao Tome and Principe</option>
          <option value="137">Senegal</option>
          <option value="138">Seychelles</option>
          <option value="136">Sierra Leone</option>
          <option value="141">Somalia</option>
          <option value="133">South Africa</option>
          <option value="140">Sudan</option>
          <option value="293">Swaziland</option>
          <option value="142">Tanzania</option>
          <option value="106">Togo</option>
          <option value="143">Tunisia</option>
          <option value="144">Uganda</option>
          <option value="301">Western Sahara</option>
          <option value="145">Zambia</option>
          <option value="117">Zimbabwe</option>
        </optgroup>
        <optgroup label="---Oceania---">
          <option value="250">American Samoa</option>
          <option value="148">Australia</option>
          <option value="258">Christmas Island</option>
          <option value="259">Cocos (Keeling) Islands</option>
          <option value="151">Cook</option>
          <option value="150">Fiji</option>
          <option value="264">French Polynesia</option>
          <option value="269">Guam</option>
          <option value="272">Heard Island and Mcdonald Islands</option>
          <option value="274">Kiribati</option>
          <option value="276">Marshall Islands</option>
          <option value="153">Micronesia</option>
          <option value="154">Nauru</option>
          <option value="249">New Caledonia</option>
          <option value="157">New Zealand</option>
          <option value="279">Northern Mariana Islands</option>
          <option value="280">Palau</option>
          <option value="149">Papua New Guinea</option>
          <option value="282">Pitcairn</option>
          <option value="152">Samoa</option>
          <option value="290">Solomon Islands</option>
          <option value="291">South Georgia and the South Sandwich Islands</option>
          <option value="294">Tokelau</option>
          <option value="155">Tonga</option>
          <option value="296">Tuvalu</option>
          <option value="156">Vanuatu</option>
          <option value="300">Wallis and Futuna</option>
        </optgroup>
      </select></td>
  </tr>
  <tr>
    <td align="right"></td>
    <td height="30" align="right">&nbsp;</td>
    <td><input type="button" name="getValue1" id="getValue1" value="get Value" />
    <input type="button" name="getText1" id="getText1" value="get Text" />
    <input type="button" name="setFocus1" id="setFocus1" value="set Focus" />
    <input type="button" name="select1" id="select1" value="select USA" /><br />
    <input type="button" value="go first" onclick="$('#country1').czCombobox('instance').gotoFirst()" />
    <input type="button" value="go prev" onclick="$('#country1').czCombobox('instance').gotoPrev()" />
    <input type="button" value="go next" onclick="$('#country1').czCombobox('instance').gotoNext()" />
    <input type="button" value="go last" onclick="$('#country1').czCombobox('instance').gotoLast()" />
    </td>
  </tr>
</table>
<br />
<br />
<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="70" align="right">Demo 2:&nbsp;</td>
    <td height="30" colspan="5">Please select your coutry</td>
  </tr>
  <tr>
    <td width="70" align="right"></td>
    <td width="100" height="30" align="right"><label for="country2">Your Country: </label> </td>
			<td colspan="4">
				<select id="country2" name="country2" tabindex="2">
          <option value="">Select</option>
          <option value="US">United States</option>
          <option value="CA">Canada</option>
          <option value="AF">Afghanistan</option>
          <option value="AL">Albania</option>
          <option value="DZ">Algeria</option>
          <option value="AS">American Samoa</option>
          <option value="AD">Andorra</option>
          <option value="AO">Angola</option>
          <option value="AI">Anguilla</option>
          <option value="AQ">Antarctica</option>
          <option value="AG">Antigua Barbuda</option>
          <option value="AR">Argentina</option>
          <option value="AM">Armenia</option>
          <option value="AW">Aruba</option>
          <option value="AU">Australia</option>
          <option value="AT">Austria</option>
          <option value="AZ">Azerbaijan</option>
          <option value="BS">Bahamas</option>
          <option value="BH">Bahrain</option>
          <option value="BD">Bangladesh</option>
          <option value="BB">Barbados</option>
          <option value="BY">Belarus</option>
          <option value="BE">Belgium</option>
          <option value="BZ">Belize</option>
          <option value="BJ">Benin</option>
          <option value="BM">Bermuda</option>
          <option value="BT">Bhutan</option>
          <option value="BO">Bolivia</option>
          <option value="BA">Bosnia</option>
          <option value="BW">Botswana</option>
          <option value="BV">Bouvet Island</option>
          <option value="BR">Brazil</option>
          <option value="IO">British Indian Ocean Territory</option>
          <option value="BN">Brunei</option>
          <option value="BG">Bulgaria</option>
          <option value="BF">Burkina-faso</option>
          <option value="BI">Burundi</option>
          <option value="KH">Cambodia</option>
          <option value="CM">Cameroon</option>
          <option value="CV">Cape Verde</option>
          <option value="KY">Cayman Islands</option>
          <option value="CF">Central Africa</option>
          <option value="TD">Chad</option>
          <option value="CL">Chile</option>
          <option value="CN">China</option>
          <option value="CX">Christmas Island</option>
          <option value="CC">Cocos (Keeling) Islands</option>
          <option value="CO">Colombia</option>
          <option value="KM">Comoros</option>
          <option value="CG">Congo</option>
          <option value="CK">Cook</option>
          <option value="CR">Costa Rica</option>
          <option value="CI">Cote d'Ivoire</option>
          <option value="HR">Croatia</option>
          <option value="CU">Cuba</option>
          <option value="CY">Cyprus</option>
          <option value="CZ">Czech Republic</option>
          <option value="CD">Democratic Republic of the Congo</option>
          <option value="DK">Denmark</option>
          <option value="DJ">Djibouti</option>
          <option value="DM">Dominica</option>
          <option value="DO">Dominican Republic</option>
          <option value="TL">East Timor</option>
          <option value="EC">Ecuador</option>
          <option value="EG">Egypt</option>
          <option value="SV">El Salvador</option>
          <option value="GQ">Equatorial Guinea</option>
          <option value="ER">Eritrea</option>
          <option value="EE">Estonia</option>
          <option value="ET">Ethiopia</option>
          <option value="FK">Falkland Islands</option>
          <option value="FO">Faroe Islands</option>
          <option value="FJ">Fiji</option>
          <option value="FI">Finland</option>
          <option selected="selected" value="FR">France</option>
          <option value="GF">French Guiana</option>
          <option value="PF">French Polynesia</option>
          <option value="TF">French Southern Territories</option>
          <option value="GA">Gabon</option>
          <option value="GM">Gambia</option>
          <option value="GE">Georgia</option>
          <option value="DE">Germany</option>
          <option value="GH">Ghana</option>
          <option value="GI">Gibraltar</option>
          <option value="GR">Greece</option>
          <option value="GL">Greenland</option>
          <option value="GD">Grenada</option>
          <option value="GP">Guadeloupe</option>
          <option value="GU">Guam</option>
          <option value="GT">Guatemala</option>
          <option value="GG">Guernsey</option>
          <option value="GN">Guinea</option>
          <option value="GW">Guinea Bissau</option>
          <option value="GY">Guyana</option>
          <option value="HT">Haiti</option>
          <option value="HM">Heard Island and Mcdonald Islands</option>
          <option value="HN">Honduras</option>
          <option value="HK">Hong Kong</option>
          <option value="HU">Hungary</option>
          <option value="IS">Iceland</option>
          <option value="IN">India</option>
          <option value="ID">Indonesia</option>
          <option value="IR">Iran</option>
          <option value="IQ">Iraq</option>
          <option value="IE">Ireland</option>
          <option value="IM">Isle of Man</option>
          <option value="IL">Israel</option>
          <option value="IT">Italy</option>
          <option value="JM">Jamaica</option>
          <option value="JP">Japan</option>
          <option value="JE">Jersey</option>
          <option value="JO">Jordan</option>
          <option value="KZ">Kazakhstan</option>
          <option value="KE">Kenya</option>
          <option value="KG">Kirgizstan</option>
          <option value="KI">Kiribati</option>
          <option value="KW">Kuwait</option>
          <option value="LA">Laos</option>
          <option value="LV">Latvia</option>
          <option value="LB">Lebanon</option>
          <option value="LS">Lesotho</option>
          <option value="LR">Liberia</option>
          <option value="LY">Libya</option>
          <option value="LI">Liechtenstein</option>
          <option value="LT">Lithuania</option>
          <option value="LU">Luxembourg</option>
          <option value="MK">Macedonia</option>
          <option value="MG">Madagascar</option>
          <option value="MW">Malawi</option>
          <option value="MY">Malaysia</option>
          <option value="MV">Maldives</option>
          <option value="ML">Mali</option>
          <option value="MT">Malta</option>
          <option value="MH">Marshall Islands</option>
          <option value="MQ">Martinique</option>
          <option value="MR">Mauritania</option>
          <option value="MU">Mauritius</option>
          <option value="MX">Mexico</option>
          <option value="FM">Micronesia</option>
          <option value="MD">Moldova</option>
          <option value="MC">Monaco</option>
          <option value="MN">Mongolia</option>
          <option value="ME">Montenegro</option>
          <option value="MA">Morocco</option>
          <option value="MZ">Mozambique</option>
          <option value="MM">Myanmar</option>
          <option value="NA">Namibia</option>
          <option value="NR">Nauru</option>
          <option value="NP">Nepal</option>
          <option value="AN">Netherlands Antilles</option>
          <option value="NC">New Caledonia</option>
          <option value="NZ">New Zealand</option>
          <option value="NI">Nicaragua</option>
          <option value="NE">Niger</option>
          <option value="NG">Nigeria</option>
          <option value="KP">North Korea</option>
          <option value="MP">Northern Mariana Islands</option>
          <option value="NO">Norway</option>
          <option value="OM">Oman</option>
          <option value="PK">Pakistan</option>
          <option value="PW">Palau</option>
          <option value="PS">Palestine</option>
          <option value="PA">Panama</option>
          <option value="PG">Papua New Guinea</option>
          <option value="PY">Paraguay</option>
          <option value="PE">Peru</option>
          <option value="PH">Philippines</option>
          <option value="PN">Pitcairn</option>
          <option value="PL">Poland</option>
          <option value="PT">Portugal</option>
          <option value="PR">Puerto Rico</option>
          <option value="QA">Qatar</option>
          <option value="RE">Reunion</option>
          <option value="RO">Romania</option>
          <option value="RU">Russia Federation</option>
          <option value="RW">Rwanda</option>
          <option value="SH">Saint Helena</option>
          <option value="KN">Saint Kitts and Nevis</option>
          <option value="PM">Saint Pierre and Miquelon</option>
          <option value="VC">Saint Vincent and the Grenadines</option>
          <option value="LC">Saint-lucia</option>
          <option value="WS">Samoa</option>
          <option value="SM">San Marino</option>
          <option value="ST">Sao Tome and Principe</option>
          <option value="SK">Slovakia</option>
          <option value="SA">Saudi Arabia</option>
          <option value="SN">Senegal</option>
          <option value="RS">The Republic of Serbia</option>
          <option value="SC">Seychelles</option>
          <option value="SL">Sierra Leone</option>
          <option value="SG">Singapore</option>
          <option value="SI">Slovenia</option>
          <option value="SB">Solomon Islands</option>
          <option value="SO">Somalia</option>
          <option value="ZA">South Africa</option>
          <option value="GS">South Georgia and the South Sandwich Islands</option>
          <option value="KR">South Korea</option>
          <option value="ES">Spain</option>
          <option value="LK">Sri Lanka</option>
          <option value="SD">Sudan</option>
          <option value="SR">Surinam</option>
          <option value="SJ">Svalbard and Jan Mayen</option>
          <option value="SZ">Swaziland</option>
          <option value="SE">Sweden</option>
          <option value="CH">Switzerland</option>
          <option value="SY">Syria</option>
          <option value="TW">Taiwan</option>
          <option value="TJ">Tajikistan</option>
          <option value="TZ">Tanzania</option>
          <option value="TH">Thailand</option>
          <option value="NL">The Netherlands</option>
          <option value="TG">Togo</option>
          <option value="TK">Tokelau</option>
          <option value="TO">Tonga</option>
          <option value="TT">Trinidad and Tobago</option>
          <option value="TN">Tunisia</option>
          <option value="TR">Turkey</option>
          <option value="TM">Turkmenistan</option>
          <option value="TC">Turks and Caicos Islands</option>
          <option value="TV">Tuvalu</option>
          <option value="UG">Uganda</option>
          <option value="UA">Ukraine</option>
          <option value="AE">United Arab Emirates</option>
          <option value="GB">United Kingdom</option>
          <option value="UM">United States Minor Outlying Islands</option>
          <option value="UY">Uruguay</option>
          <option value="UZ">Uzbekistan</option>
          <option value="VU">Vanuatu</option>
          <option value="VE">Venezuela</option>
          <option value="VN">Viet Nam</option>
          <option value="VG">Virgin Islands, British</option>
          <option value="VI">Virgin Islands, U.S.</option>
          <option value="WF">Wallis and Futuna</option>
          <option value="EH">Western Sahara</option>
          <option value="YE">Yemen</option>
          <option value="ZM">Zambia</option>
          <option value="ZW">Zimbabwe</option>
        </select>
      </td>
  </tr>
  <tr>
    <td align="right"></td>
    <td height="30" align="right">&nbsp;</td>
    <td width="90"><input type="button" name="getValue2" id="getValue2" value="get Value" /></td>
    <td width="90"><input type="button" name="getText2" id="getText2" value="get Text" /></td>
    <td width="90"><input type="button" name="setFocus2" id="setFocus2" value="set Focus" /></td>
    <td><input type="button" name="select2" id="select2" value="select USA" /></td>
  </tr>
</table>
<br />
<br />
<table width="600" border="0" cellspacing="0" cellpadding="0" id="countryWrap">
  <tr>
    <td width="70" align="right">Demo 3:&nbsp;</td>
    <td height="30" colspan="2">Please select your language</td>
  </tr>
  <tr>
    <td width="70" align="right"></td>
    <td width="100" height="30" align="right"><label for="language">Language: </label> </td>
    <td>
      <select id="language" name="language" tabindex="3">
        <option value="en_us">English</option>
        <option value="ge_ge">German</option>
        <option value="fr_fr">French</option>
        <option value="jp_jp">Japanese</option>
      </select>
    </td>
  </tr>
  <tr>
    <td align="right"></td>
    <td height="30" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
